home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 4
/
The Arsenal Files 4 (Arsenal Computer).ISO
/
casm
/
au116-as.exe
/
UTIL
/
LIST.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-12-13
|
629b
|
35 lines
#include "..\au.hpp"
/*************************************************************************/
void LISTPTR::add(char *string)
{
LIST *temp;
temp = new LIST;
temp->data = new char[strlen(string)+1];
strcpy(temp->data, string);
if (head == NULL)
head = tail = temp;
else
{
tail->next = temp;
tail = temp;
}
return;
}
/*************************************************************************/
void LISTPTR::destroy()
{
LIST *temp, *next;
temp = head;
while (temp != NULL)
{
next = temp->next;
delete [] temp->data;
delete temp;
temp = next;
}
reset();
return;
}